set(ASN_MODULE_SRCS
  ANY_aper.c
  ANY_ber.c
  ANY.c
  ANY_uper.c
  ANY_xer.c
  aper_decoder.c
  aper_encoder.c
  aper_opentype.c
  aper_support.c
  asn_application.c
  asn_bit_data.c
  asn_codecs_prim_ber.c
  asn_codecs_prim.c
  asn_codecs_prim_xer.c
  asn_internal.c
  asn_random_fill.c
  asn_SEQUENCE_OF.c
  asn_SET_OF.c
  ber_decoder.c
  ber_tlv_length.c
  ber_tlv_tag.c
  BIT_STRING.c
  BIT_STRING_print.c
  BIT_STRING_rfill.c
  BIT_STRING_uper.c
  BIT_STRING_xer.c
  Cause.c
  CauseMisc.c
  CauseProtocol.c
  CauseRIC.c
  CauseRICservice.c
  CauseTransport.c
  constraints.c
  constr_CHOICE_aper.c
  constr_CHOICE_ber.c
  constr_CHOICE.c
  constr_CHOICE_print.c
  constr_CHOICE_rfill.c
  constr_CHOICE_uper.c
  constr_CHOICE_xer.c
  constr_SEQUENCE_aper.c
  constr_SEQUENCE_ber.c
  constr_SEQUENCE.c
  constr_SEQUENCE_OF_aper.c
  constr_SEQUENCE_OF_ber.c
  constr_SEQUENCE_OF.c
  constr_SEQUENCE_OF_uper.c
  constr_SEQUENCE_OF_xer.c
  constr_SEQUENCE_print.c
  constr_SEQUENCE_rfill.c
  constr_SEQUENCE_uper.c
  constr_SEQUENCE_xer.c
  constr_SET_OF_aper.c
  constr_SET_OF_ber.c
  constr_SET_OF.c
  constr_SET_OF_print.c
  constr_SET_OF_rfill.c
  constr_SET_OF_uper.c
  constr_SET_OF_xer.c
  constr_TYPE.c
  Criticality.c
  CriticalityDiagnostics.c
  CriticalityDiagnostics-IE-Item.c
  CriticalityDiagnostics-IE-List.c
  der_encoder.c
  E2AP-PDU.c
  E2connectionSetupFailed-Item.c
  E2connectionSetupFailed-List.c
  E2connectionUpdateAcknowledge.c
  E2connectionUpdate.c
  E2connectionUpdateFailure.c
  E2connectionUpdate-Item.c
  E2connectionUpdate-List.c
  E2connectionUpdateRemove-Item.c
  E2connectionUpdateRemove-List.c
  E2nodeComponentConfigUpdateAck.c
  E2nodeComponentConfigUpdateAck-Item.c
  E2nodeComponentConfigUpdateAck-List.c
  E2nodeComponentConfigUpdate.c
  E2nodeComponentConfigUpdateENB.c
  E2nodeComponentConfigUpdateENgNB.c
  E2nodeComponentConfigUpdateGNB.c
  E2nodeComponentConfigUpdate-Item.c
  E2nodeComponentConfigUpdate-List.c
  E2nodeComponentConfigUpdateNGeNB.c
  E2nodeComponentGNB-CU-UP-ID.c
  E2nodeComponentGNB-DU-ID.c
  E2nodeComponentID.c
  E2nodeComponentType.c
  E2nodeConfigurationUpdateAcknowledge.c
  E2nodeConfigurationUpdate.c
  E2nodeConfigurationUpdateFailure.c
  E2nodeConnected-List.c
  E2setupFailure.c
  E2setupRequest.c
  E2setupResponse.c
  E42RICcontrolRequest.c
  E42RICsubscriptionDeleteRequest.c
  E42RICsubscriptionRequest.c
  E42setupRequest.c
  E42setupResponse.c
  ENB-ID.c
  ENB-ID-Choice.c
  ENGNB-ID.c
  ErrorIndication.c
  EXTERNAL.c
  GlobalE2node-eNB-ID.c
  GlobalE2node-en-gNB-ID.c
  GlobalE2node-gNB-ID.c
  GlobalE2node-ID.c
  GlobalE2node-ng-eNB-ID.c
  GlobalENB-ID.c
  GlobalenGNB-ID.c
  GlobalgNB-ID.c
  GlobalngeNB-ID.c
  GlobalRIC-ID.c
  GNB-CU-UP-ID.c
  GNB-DU-ID.c
  GNB-ID-Choice.c
  GraphicString.c
  InitiatingMessage.c
  INTEGER_aper.c
  INTEGER_ber.c
  INTEGER.c
  INTEGER_print.c
  INTEGER_rfill.c
  INTEGER_uper.c
  INTEGER_xer.c
  NativeEnumerated_aper.c
  NativeEnumerated.c
  NativeEnumerated_uper.c
  NativeEnumerated_xer.c
  NativeInteger_aper.c
  NativeInteger_ber.c
  NativeInteger.c
  NativeInteger_print.c
  NativeInteger_rfill.c
  NativeInteger_uper.c
  NativeInteger_xer.c
  ObjectDescriptor.c
  OBJECT_IDENTIFIER.c
  OBJECT_IDENTIFIER_print.c
  OBJECT_IDENTIFIER_rfill.c
  OBJECT_IDENTIFIER_xer.c
  OCTET_STRING_aper.c
  OCTET_STRING_ber.c
  OCTET_STRING.c
  OCTET_STRING_print.c
  OCTET_STRING_rfill.c
  OCTET_STRING_uper.c
  OCTET_STRING_xer.c
  OPEN_TYPE_aper.c
  OPEN_TYPE_ber.c
  OPEN_TYPE.c
  OPEN_TYPE_uper.c
  OPEN_TYPE_xer.c
  per_decoder.c
  per_encoder.c
  per_opentype.c
  per_support.c
  PLMN-Identity.c
  Presence.c
  PrintableString.c
  ProcedureCode.c
  ProtocolIE-Container.c
  ProtocolIE-ContainerList.c
  ProtocolIE-ContainerPair.c
  ProtocolIE-ContainerPairList.c
  ProtocolIE-Field.c
  ProtocolIE-FieldPair.c
  ProtocolIE-ID.c
  ProtocolIE-SingleContainer.c
  RANfunctionDefinition.c
  RANfunctionID.c
  RANfunctionIDcause-Item.c
  RANfunctionID-Item.c
  RANfunction-Item.c
  RANfunctionOID.c
  RANfunctionRevision.c
  RANfunctionsIDcause-List.c
  RANfunctionsID-List.c
  RANfunctions-List.c
  ResetRequest.c
  ResetResponse.c
  RICaction-Admitted-Item.c
  RICaction-Admitted-List.c
  RICactionDefinition.c
  RICactionID.c
  RICaction-NotAdmitted-Item.c
  RICaction-NotAdmitted-List.c
  RICactions-ToBeSetup-List.c
  RICaction-ToBeSetup-Item.c
  RICactionType.c
  RICcallProcessID.c
  RICcontrolAcknowledge.c
  RICcontrolAckRequest.c
  RICcontrolFailure.c
  RICcontrolHeader.c
  RICcontrolMessage.c
  RICcontrolOutcome.c
  RICcontrolRequest.c
  RICcontrolStatus.c
  RICeventTriggerDefinition.c
  RICindication.c
  RICindicationHeader.c
  RICindicationMessage.c
  RICindicationSN.c
  RICindicationType.c
  RICrequestID.c
  RICserviceQuery.c
  RICserviceUpdateAcknowledge.c
  RICserviceUpdate.c
  RICserviceUpdateFailure.c
  RICsubscriptionDeleteFailure.c
  RICsubscriptionDeleteRequest.c
  RICsubscriptionDeleteResponse.c
  RICsubscriptionDetails.c
  RICsubscriptionFailure.c
  RICsubscriptionRequest.c
  RICsubscriptionResponse.c
  RICsubsequentAction.c
  RICsubsequentActionType.c
  RICtimeToWait.c
  SuccessfulOutcome.c
  TimeToWait.c
  TNLinformation.c
  TNLusage.c
  TriggeringMessage.c
  TypeOfError.c
  UnsuccessfulOutcome.c
  uper_decoder.c
  uper_encoder.c
  uper_opentype.c
  uper_support.c
  XAPP-ID.c
  xer_decoder.c
  xer_encoder.c
  xer_support.c
  )

if(FALSE) # fake a block comment

set(ASN_MODULE_SRCS_2
    E2AP-PDU.c
    InitiatingMessage.c
    SuccessfulOutcome.c
    UnsuccessfulOutcome.c
    RICsubscriptionRequest.c
    RICsubscriptionDetails.c
    RICactions-ToBeSetup-List.c
    RICaction-ToBeSetup-Item.c
    RICsubscriptionResponse.c
    RICaction-Admitted-List.c
    RICaction-Admitted-Item.c
    RICaction-NotAdmitted-List.c
    RICaction-NotAdmitted-Item.c
    RICsubscriptionFailure.c
    RICsubscriptionDeleteRequest.c
    RICsubscriptionDeleteResponse.c
    RICsubscriptionDeleteFailure.c
    RICindication.c
    RICcontrolRequest.c
    RICcontrolAcknowledge.c
    RICcontrolFailure.c
    ErrorIndication.c
    E2setupRequest.c
    E2setupResponse.c
    E2setupFailure.c
    E2connectionUpdate.c
    E2connectionUpdate-List.c
    E2connectionUpdate-Item.c
    E2connectionUpdateRemove-List.c
    E2connectionUpdateRemove-Item.c
    E2connectionUpdateAcknowledge.c
    E2connectionSetupFailed-List.c
    E2connectionSetupFailed-Item.c
    E2connectionUpdateFailure.c
    E2nodeConfigurationUpdate.c
    E2nodeComponentConfigUpdate-List.c
    E2nodeComponentConfigUpdate-Item.c
    E2nodeConfigurationUpdateAcknowledge.c
    E2nodeComponentConfigUpdateAck-List.c
    E2nodeComponentConfigUpdateAck-Item.c
    E2nodeConfigurationUpdateFailure.c
    ResetRequest.c
    ResetResponse.c
    RICserviceUpdate.c
    RANfunctions-List.c
    RANfunction-Item.c
    RANfunctionsID-List.c
    RANfunctionID-Item.c
    RICserviceUpdateAcknowledge.c
    RANfunctionsIDcause-List.c
    RANfunctionIDcause-Item.c
    RICserviceUpdateFailure.c
    RICserviceQuery.c
    Cause.c
    CauseMisc.c
    CauseProtocol.c
    CauseRIC.c
    CauseRICservice.c
    CauseTransport.c
    CriticalityDiagnostics.c
    CriticalityDiagnostics-IE-List.c
    CriticalityDiagnostics-IE-Item.c
    E2nodeComponentConfigUpdate.c
    E2nodeComponentConfigUpdateGNB.c
    E2nodeComponentConfigUpdateENgNB.c
    E2nodeComponentConfigUpdateNGeNB.c
    E2nodeComponentConfigUpdateENB.c
    E2nodeComponentConfigUpdateAck.c
    E2nodeComponentType.c
    E2nodeComponentID.c
    E2nodeComponentGNB-CU-UP-ID.c
    E2nodeComponentGNB-DU-ID.c
    ENB-ID.c
    ENB-ID-Choice.c
    ENGNB-ID.c
    GlobalE2node-ID.c
    GlobalE2node-en-gNB-ID.c
    GlobalE2node-eNB-ID.c
    GlobalE2node-gNB-ID.c
    GlobalE2node-ng-eNB-ID.c
    GlobalENB-ID.c
    GlobalenGNB-ID.c
    GlobalgNB-ID.c
    GlobalngeNB-ID.c
    GlobalRIC-ID.c
    GNB-CU-UP-ID.c
    GNB-DU-ID.c
    GNB-ID-Choice.c
    PLMN-Identity.c
    RANfunctionDefinition.c
    RANfunctionID.c
    RANfunctionOID.c
    RANfunctionRevision.c
    RICactionDefinition.c
    RICactionID.c
    RICactionType.c
    RICcallProcessID.c
    RICcontrolAckRequest.c
    RICcontrolHeader.c
    RICcontrolMessage.c
    RICcontrolOutcome.c
    RICcontrolStatus.c
    RICeventTriggerDefinition.c
    RICindicationHeader.c
    RICindicationMessage.c
    RICindicationSN.c
    RICindicationType.c
    RICrequestID.c
    RICsubsequentAction.c
    RICsubsequentActionType.c
    RICtimeToWait.c
    TimeToWait.c
    TNLinformation.c
    TNLusage.c
    TypeOfError.c
    Criticality.c
    Presence.c
    ProcedureCode.c
    ProtocolIE-ID.c
    TriggeringMessage.c
    ProtocolIE-Container.c
    ProtocolIE-SingleContainer.c
    ProtocolIE-Field.c
    ProtocolIE-ContainerPair.c
    ProtocolIE-FieldPair.c
    ProtocolIE-ContainerList.c
    ProtocolIE-ContainerPairList.c
    ANY.c
    OPEN_TYPE.c
    INTEGER.c
    NativeEnumerated.c
    NativeInteger.c
    PrintableString.c
    asn_SEQUENCE_OF.c
    asn_SET_OF.c
    constr_CHOICE.c
    constr_SEQUENCE.c
    constr_SEQUENCE_OF.c
    constr_SET_OF.c
    asn_application.c
    asn_internal.c
    asn_random_fill.c
    asn_bit_data.c
    OCTET_STRING.c
    BIT_STRING.c
    asn_codecs_prim.c
    ber_tlv_length.c
    ber_tlv_tag.c
    ber_decoder.c
    der_encoder.c
    constr_TYPE.c
    constraints.c
    xer_support.c
    xer_decoder.c
    xer_encoder.c
    per_support.c
    per_decoder.c
    per_encoder.c
    per_opentype.c
    E42setupRequest.c
    E42setupResponse.c
    E42RICsubscriptionRequest.c
    E42RICsubscriptionDeleteRequest.c
    E42RICcontrolRequest.c
    XAPP-ID.c
    E2nodeConnected-List.c
)


set(ASN_MODULE_HDRS
    E2AP-PDU.h
    InitiatingMessage.h
    SuccessfulOutcome.h
    UnsuccessfulOutcome.h
    RICsubscriptionRequest.h
    RICsubscriptionDetails.h
    RICactions-ToBeSetup-List.h
    RICaction-ToBeSetup-Item.h
    RICsubscriptionResponse.h
    RICaction-Admitted-List.h
    RICaction-Admitted-Item.h
    RICaction-NotAdmitted-List.h
    RICaction-NotAdmitted-Item.h
    RICsubscriptionFailure.h
    RICsubscriptionDeleteRequest.h
    RICsubscriptionDeleteResponse.h
    RICsubscriptionDeleteFailure.h
    RICindication.h
    RICcontrolRequest.h
    RICcontrolAcknowledge.h
    RICcontrolFailure.h
    ErrorIndication.h
    E2setupRequest.h
    E2setupResponse.h
    E2setupFailure.h
    E2connectionUpdate.h
    E2connectionUpdate-List.h
    E2connectionUpdate-Item.h
    E2connectionUpdateRemove-List.h
    E2connectionUpdateRemove-Item.h
    E2connectionUpdateAcknowledge.h
    E2connectionSetupFailed-List.h
    E2connectionSetupFailed-Item.h
    E2connectionUpdateFailure.h
    E2nodeConfigurationUpdate.h
    E2nodeComponentConfigUpdate-List.h
    E2nodeComponentConfigUpdate-Item.h
    E2nodeConfigurationUpdateAcknowledge.h
    E2nodeComponentConfigUpdateAck-List.h
    E2nodeComponentConfigUpdateAck-Item.h
    E2nodeConfigurationUpdateFailure.h
    ResetRequest.h
    ResetResponse.h
    RICserviceUpdate.h
    RANfunctions-List.h
    RANfunction-Item.h
    RANfunctionsID-List.h
    RANfunctionID-Item.h
    RICserviceUpdateAcknowledge.h
    RANfunctionsIDcause-List.h
    RANfunctionIDcause-Item.h
    RICserviceUpdateFailure.h
    RICserviceQuery.h
    Cause.h
    CauseMisc.h
    CauseProtocol.h
    CauseRIC.h
    CauseRICservice.h
    CauseTransport.h
    CriticalityDiagnostics.h
    CriticalityDiagnostics-IE-List.h
    CriticalityDiagnostics-IE-Item.h
    E2nodeComponentConfigUpdate.h
    E2nodeComponentConfigUpdateGNB.h
    E2nodeComponentConfigUpdateENgNB.h
    E2nodeComponentConfigUpdateNGeNB.h
    E2nodeComponentConfigUpdateENB.h
    E2nodeComponentConfigUpdateAck.h
    E2nodeComponentType.h
    E2nodeComponentID.h
    E2nodeComponentGNB-CU-UP-ID.h
    E2nodeComponentGNB-DU-ID.h
    ENB-ID.h
    ENB-ID-Choice.h
    ENGNB-ID.h
    GlobalE2node-ID.h
    GlobalE2node-en-gNB-ID.h
    GlobalE2node-eNB-ID.h
    GlobalE2node-gNB-ID.h
    GlobalE2node-ng-eNB-ID.h
    GlobalENB-ID.h
    GlobalenGNB-ID.h
    GlobalgNB-ID.h
    GlobalngeNB-ID.h
    GlobalRIC-ID.h
    GNB-CU-UP-ID.h
    GNB-DU-ID.h
    GNB-ID-Choice.h
    PLMN-Identity.h
    RANfunctionDefinition.h
    RANfunctionID.h
    RANfunctionOID.h
    RANfunctionRevision.h
    RICactionDefinition.h
    RICactionID.h
    RICactionType.h
    RICcallProcessID.h
    RICcontrolAckRequest.h
    RICcontrolHeader.h
    RICcontrolMessage.h
    RICcontrolOutcome.h
    RICcontrolStatus.h
    RICeventTriggerDefinition.h
    RICindicationHeader.h
    RICindicationMessage.h
    RICindicationSN.h
    RICindicationType.h
    RICrequestID.h
    RICsubsequentAction.h
    RICsubsequentActionType.h
    RICtimeToWait.h
    TimeToWait.h
    TNLinformation.h
    TNLusage.h
    TypeOfError.h
    Criticality.h
    Presence.h
    ProcedureCode.h
    ProtocolIE-ID.h
    TriggeringMessage.h
    ProtocolIE-Container.h
    ProtocolIE-SingleContainer.h
    ProtocolIE-Field.h
    ProtocolIE-ContainerPair.h
    ProtocolIE-FieldPair.h
    ProtocolIE-ContainerList.h
    ProtocolIE-ContainerPairList.h
    ANY.h
    OCTET_STRING.h
    OPEN_TYPE.h
    constr_CHOICE.h
    INTEGER.h
    NativeEnumerated.h
    NativeInteger.h
    PrintableString.h
    asn_SEQUENCE_OF.h
    asn_SET_OF.h
    constr_SEQUENCE.h
    constr_SEQUENCE_OF.h
    constr_SET_OF.h
    asn_application.h
    asn_ioc.h
    asn_system.h
    asn_codecs.h
    asn_internal.h
    asn_random_fill.h
    asn_bit_data.h
    BIT_STRING.h
    asn_codecs_prim.h
    ber_tlv_length.h
    ber_tlv_tag.h
    ber_decoder.h
    der_encoder.h
    constr_TYPE.h
    constraints.h
    xer_support.h
    xer_decoder.h
    xer_encoder.h
    per_support.h
    per_decoder.h
    per_encoder.h
    per_opentype.h
)

endif()




add_library(e2ap_asn1_obj OBJECT ${ASN_MODULE_SRCS})
#${ASN_MODULE_HDRS})
target_include_directories(e2ap_asn1_obj
                          PUBLIC
                           "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
                           )

target_compile_options(e2ap_asn1_obj PUBLIC "-DASN_DISABLE_OER_SUPPORT")
target_compile_options(e2ap_asn1_obj PUBLIC "-DASN_DISABLE_JER_SUPPORT")
target_compile_options(e2ap_asn1_obj PRIVATE -Wno-missing-field-initializers -Wno-unused-parameter)

